<!DOCTYPE html>
<html>
  <head>
    <title>Circles 后台管理</title>
    <%= csrf_meta_tags %> <%= csp_meta_tag %> 

     <%= javascript_pack_tag 'application' %>
  </head>

  <body>
    <header>
      <ul class="nav navbar-nav">
        <li>
          <a href="/">Home</a>
        </li>
        <li>
          <a href="<%= admin_users_path %>">用户管理</a>
        </li>

        <% if logged_in? %>
          <li><%= link_to  "#{current_user.username}退出", session_path(session[:user_id]), method: "delete" %></li>
        <% else %>
          <li><%= link_to "登录", new_session_path %></li>
        <% end %>
      </ul>
    </header>
    <div>
      <% if flash[:notice]%>
        <div class="alert alert-info"><%= flash[:notice] %></div>
      <% end %>
      <%= yield %>
    </div>
  </body>
</html>
